package com.sh.data.engine.domain.authority.service.impl;

import com.sh.data.engine.domain.authority.service.StatisticService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;

@Service
public class StatisticEntranceService {

    @Resource
    private Map<String, StatisticService> statisticServiceMap;

    public Long executionCount(String type) {
        StatisticService statisticService = statisticServiceMap.get(type);
        return statisticService.statistic();
    }

    public void executionUpdate(String type, Long before, Long after) {
        StatisticService statisticService = statisticServiceMap.get(type);
        statisticService.update(before, after);
    }
}
